﻿<cfscript>
/** 
* ORM TaskArrange
* 
* @hint "Hibernate persistenter t_task_arrange. 教学任务课程安排表" 
* 
*/ 

component 
	displayname="public.service.orm.senate.TaskArrange" 
	output=false 
	persistent=true 
	selectBeforeUpdate=true dynamicInsert=true dynamicUpdate=true 
	cacheuse="Transactional" 
	entityname="TaskArrange" 
	table="t_task_arrange"
	{

	property type="string" name="TaskID" column="task_id" fieldtype="id" generator="assigned" hint="教学任务号";

	property type="string" name="CourseIndex" column="cidx" hint="课序号";
	property type="string" name="TaskType" column="task_type" hint="教学任务类别";
	property type="numeric" name="PeriodDone" column="period_done" hint="已排学时数";
	property type="numeric" name="PeriodNeed" column="period_need" hint="需安排学时数";

	property name="Term" fieldtype="many-to-one" fkcolumn="term_id" cfc="Term" hint="学期";
	property name="Course" fieldtype="many-to-one" fkcolumn="cid" cfc="Course" hint="课程";

	property name="TaskTimeTable" type="array" lazy="true" inverse="true" cascade="delete-orphan" fieldtype="one-to-many" fkcolumn="task_id" cfc="TaskTimeTable" hint="教学任务上课时间地点占用情况";

	property name="TaskClassRooms" type="array" fieldtype="collection" table="t_task_timetable" fkcolumn="task_id" elementcolumn="taskclsroom" elementtype="string" orderBy="tidx asc" hint="排课使用的教室";
	property name="TaskClassTimes" type="array" fieldtype="collection" table="t_task_timetable" fkcolumn="task_id" elementcolumn="tasktime" elementtype="string" orderBy="tidx asc" hint="排课使用的时间";
	
}

</cfscript>